/**
 * Created with IntelliJ IDEA.
 * User: wenxiwen
 * Date: 2022/3/26
 * Time: 17:36
 * Description: No Description
 */

class myDay {

    public int year = 1998 ;
    public int month = 12;
    public int day ;

    //构造方法
    public myDay() {

    }
    //成员方法
    public void dat(int year, int month , int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }
    public void dat(int year,int month) {
        this.year = year;
        this.month = month;
        this.day = day;
        System.out.println(year + "年" + " " + month + "月" + " " + day + "日" + " ");
    }
}
public class TestDemo1 {
    public static void main(String[] args) {
        myDay myday = new myDay();
        myday.dat(2022,12);

    }
    /*public static void main1(String[] args) {
        myDay myday = new myDay();
        myday.year = 2022;
        myday.day = 31;
        myday.month = 4;
        myday.show();
    }*/

}